# Maintainer: Justin Davis (juster) <jrcd83@gmail.com>
# $Id: PKGBUILD 71637 2012-05-31 15:15:04Z juster $

pkgname=perl-test-trap
pkgver=0.2.2
pkgrel=1
pkgdesc='Trap exit codes, exceptions, output, etc.'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.6.2' perl-data-dump 'perl-test-tester>=0.107')
url=https://metacpan.org/release/Test-Trap
source=("http://search.cpan.org/CPAN/authors/id/E/EB/EBHANSSEN/Test-Trap-v$pkgver.tar.gz")
md5sums=(26538477cb670aa6c72ad7d3859f670c)
sha512sums=(4131bdb98e1b327c66c9b01f48a58a7aaba7f4805fcc24642cc5f9b6025650f490f38dd90c92897f6b4e12b0ae3db4c7961946b2b2e5df3207493e435beee7b8)
_dir="$srcdir/Test-Trap-v$pkgver"

build()
(
  cd "$_dir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$_dir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$_dir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
